<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>正在验证登录...</title>
</head>
<style>
    html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}

    .loader {
        --background: linear-gradient(135deg, #23C4F8, #275EFE);
        --shadow: rgba(39, 94, 254, 0.28);
        --text: #6C7486;
        --page: rgba(255, 255, 255, 0.36);
        --page-fold: rgba(255, 255, 255, 0.52);
        --duration: 3s;
        width: 200px;
        height: 140px;
        position: relative;
    }
    .loader:before, .loader:after {
        --r: -6deg;
        content: "";
        position: absolute;
        bottom: 8px;
        width: 120px;
        top: 80%;
        box-shadow: 0 16px 12px var(--shadow);
        transform: rotate(var(--r));
    }
    .loader:before {
        left: 4px;
    }
    .loader:after {
        --r: 6deg;
        right: 4px;
    }
    .loader div {
        width: 100%;
        height: 100%;
        border-radius: 13px;
        position: relative;
        z-index: 1;
        perspective: 600px;
        box-shadow: 0 4px 6px var(--shadow);
        background-image: var(--background);
    }
    .loader div ul {
        margin: 0;
        padding: 0;
        list-style: none;
        position: relative;
    }
    .loader div ul li {
        --r: 180deg;
        --o: 0;
        --c: var(--page);
        position: absolute;
        top: 10px;
        left: 10px;
        transform-origin: 100% 50%;
        color: var(--c);
        opacity: var(--o);
        transform: rotateY(var(--r));
        -webkit-animation: var(--duration) ease infinite;
                animation: var(--duration) ease infinite;
    }
    .loader div ul li:nth-child(2) {
        --c: var(--page-fold);
        -webkit-animation-name: page-2;
                animation-name: page-2;
    }
    .loader div ul li:nth-child(3) {
        --c: var(--page-fold);
        -webkit-animation-name: page-3;
                animation-name: page-3;
    }
    .loader div ul li:nth-child(4) {
        --c: var(--page-fold);
        -webkit-animation-name: page-4;
                animation-name: page-4;
    }
    .loader div ul li:nth-child(5) {
        --c: var(--page-fold);
        -webkit-animation-name: page-5;
                animation-name: page-5;
    }
    .loader div ul li svg {
        width: 90px;
        height: 120px;
        display: block;
    }
    .loader div ul li:first-child {
        --r: 0deg;
        --o: 1;
    }
    .loader div ul li:last-child {
        --o: 1;
    }
    .loader span {
        display: block;
        left: 0;
        right: 0;
        top: 100%;
        margin-top: 20px;
        text-align: center;
        color: var(--text);
    }

    #fail span {
        display: block;
        left: 0;
        right: 0;
        top: 100%;
        margin-top: 20px;
        text-align: center;
        color: var(--text);
    }

    @-webkit-keyframes page-2 {
        0% {
            transform: rotateY(180deg);
            opacity: 0;
        }
        20% {
            opacity: 1;
        }
        35%, 100% {
            opacity: 0;
        }
        50%, 100% {
            transform: rotateY(0deg);
        }
    }

    @keyframes page-2 {
        0% {
            transform: rotateY(180deg);
            opacity: 0;
        }
        20% {
            opacity: 1;
        }
        35%, 100% {
            opacity: 0;
        }
        50%, 100% {
            transform: rotateY(0deg);
        }
    }
    @-webkit-keyframes page-3 {
        15% {
            transform: rotateY(180deg);
            opacity: 0;
        }
        35% {
            opacity: 1;
        }
        50%, 100% {
            opacity: 0;
        }
        65%, 100% {
            transform: rotateY(0deg);
        }
    }
    @keyframes page-3 {
        15% {
            transform: rotateY(180deg);
            opacity: 0;
        }
        35% {
            opacity: 1;
        }
        50%, 100% {
            opacity: 0;
        }
        65%, 100% {
            transform: rotateY(0deg);
        }
    }
    @-webkit-keyframes page-4 {
        30% {
            transform: rotateY(180deg);
            opacity: 0;
        }
        50% {
            opacity: 1;
        }
        65%, 100% {
            opacity: 0;
        }
        80%, 100% {
            transform: rotateY(0deg);
        }
    }
    @keyframes page-4 {
        30% {
            transform: rotateY(180deg);
            opacity: 0;
        }
        50% {
            opacity: 1;
        }
        65%, 100% {
            opacity: 0;
        }
        80%, 100% {
            transform: rotateY(0deg);
        }
    }
    @-webkit-keyframes page-5 {
        45% {
            transform: rotateY(180deg);
            opacity: 0;
        }
        65% {
            opacity: 1;
        }
        80%, 100% {
            opacity: 0;
        }
        95%, 100% {
            transform: rotateY(0deg);
        }
    }
    @keyframes page-5 {
        45% {
            transform: rotateY(180deg);
            opacity: 0;
        }
        65% {
            opacity: 1;
        }
        80%, 100% {
            opacity: 0;
        }
        95%, 100% {
            transform: rotateY(0deg);
        }
    }
    html {
        box-sizing: border-box;
        -webkit-font-smoothing: antialiased;
    }

    * {
        box-sizing: inherit;
    }
    *:before, *:after {
        box-sizing: inherit;
    }

    body {
        text-align: center;
        min-height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        background: #1C212E;
        font-family: "Roboto", Arial;
    }
    body .dribbble {
        position: fixed;
        display: block;
        right: 24px;
        bottom: 24px;
    }
    body .dribbble img {
        display: block;
        width: 76px;
    }

    .back {
        position: absolute;
        left: calc(50% - 75px);
        width: 150px;
        height: 45px;
        line-height: 45px;
        border-radius: 10px;
        background-color: #409eff;
        text-align: center;
        color: #ffffff;
        margin-top: 20px;
    }
    a {
        text-decoration: none;
    }
</style>

<body>
<!-- partial:index.partial.html -->
<div class="loader" id="loading">
  <div>
    <ul>
      <li>
        <svg viewBox="0 0 90 120" fill="currentColor">
          <path d="M90,0 L90,120 L11,120 C4.92486775,120 0,115.075132 0,109 L0,11 C0,4.92486775 4.92486775,0 11,0 L90,0 Z M71.5,81 L18.5,81 C17.1192881,81 16,82.1192881 16,83.5 C16,84.8254834 17.0315359,85.9100387 18.3356243,85.9946823 L18.5,86 L71.5,86 C72.8807119,86 74,84.8807119 74,83.5 C74,82.1745166 72.9684641,81.0899613 71.6643757,81.0053177 L71.5,81 Z M71.5,57 L18.5,57 C17.1192881,57 16,58.1192881 16,59.5 C16,60.8254834 17.0315359,61.9100387 18.3356243,61.9946823 L18.5,62 L71.5,62 C72.8807119,62 74,60.8807119 74,59.5 C74,58.1192881 72.8807119,57 71.5,57 Z M71.5,33 L18.5,33 C17.1192881,33 16,34.1192881 16,35.5 C16,36.8254834 17.0315359,37.9100387 18.3356243,37.9946823 L18.5,38 L71.5,38 C72.8807119,38 74,36.8807119 74,35.5 C74,34.1192881 72.8807119,33 71.5,33 Z"></path>
        </svg>
      </li>
      <li>
        <svg viewBox="0 0 90 120" fill="currentColor">
          <path d="M90,0 L90,120 L11,120 C4.92486775,120 0,115.075132 0,109 L0,11 C0,4.92486775 4.92486775,0 11,0 L90,0 Z M71.5,81 L18.5,81 C17.1192881,81 16,82.1192881 16,83.5 C16,84.8254834 17.0315359,85.9100387 18.3356243,85.9946823 L18.5,86 L71.5,86 C72.8807119,86 74,84.8807119 74,83.5 C74,82.1745166 72.9684641,81.0899613 71.6643757,81.0053177 L71.5,81 Z M71.5,57 L18.5,57 C17.1192881,57 16,58.1192881 16,59.5 C16,60.8254834 17.0315359,61.9100387 18.3356243,61.9946823 L18.5,62 L71.5,62 C72.8807119,62 74,60.8807119 74,59.5 C74,58.1192881 72.8807119,57 71.5,57 Z M71.5,33 L18.5,33 C17.1192881,33 16,34.1192881 16,35.5 C16,36.8254834 17.0315359,37.9100387 18.3356243,37.9946823 L18.5,38 L71.5,38 C72.8807119,38 74,36.8807119 74,35.5 C74,34.1192881 72.8807119,33 71.5,33 Z"></path>
        </svg>
      </li>
      <li>
        <svg viewBox="0 0 90 120" fill="currentColor">
          <path d="M90,0 L90,120 L11,120 C4.92486775,120 0,115.075132 0,109 L0,11 C0,4.92486775 4.92486775,0 11,0 L90,0 Z M71.5,81 L18.5,81 C17.1192881,81 16,82.1192881 16,83.5 C16,84.8254834 17.0315359,85.9100387 18.3356243,85.9946823 L18.5,86 L71.5,86 C72.8807119,86 74,84.8807119 74,83.5 C74,82.1745166 72.9684641,81.0899613 71.6643757,81.0053177 L71.5,81 Z M71.5,57 L18.5,57 C17.1192881,57 16,58.1192881 16,59.5 C16,60.8254834 17.0315359,61.9100387 18.3356243,61.9946823 L18.5,62 L71.5,62 C72.8807119,62 74,60.8807119 74,59.5 C74,58.1192881 72.8807119,57 71.5,57 Z M71.5,33 L18.5,33 C17.1192881,33 16,34.1192881 16,35.5 C16,36.8254834 17.0315359,37.9100387 18.3356243,37.9946823 L18.5,38 L71.5,38 C72.8807119,38 74,36.8807119 74,35.5 C74,34.1192881 72.8807119,33 71.5,33 Z"></path>
        </svg>
      </li>
      <li>
        <svg viewBox="0 0 90 120" fill="currentColor">
          <path d="M90,0 L90,120 L11,120 C4.92486775,120 0,115.075132 0,109 L0,11 C0,4.92486775 4.92486775,0 11,0 L90,0 Z M71.5,81 L18.5,81 C17.1192881,81 16,82.1192881 16,83.5 C16,84.8254834 17.0315359,85.9100387 18.3356243,85.9946823 L18.5,86 L71.5,86 C72.8807119,86 74,84.8807119 74,83.5 C74,82.1745166 72.9684641,81.0899613 71.6643757,81.0053177 L71.5,81 Z M71.5,57 L18.5,57 C17.1192881,57 16,58.1192881 16,59.5 C16,60.8254834 17.0315359,61.9100387 18.3356243,61.9946823 L18.5,62 L71.5,62 C72.8807119,62 74,60.8807119 74,59.5 C74,58.1192881 72.8807119,57 71.5,57 Z M71.5,33 L18.5,33 C17.1192881,33 16,34.1192881 16,35.5 C16,36.8254834 17.0315359,37.9100387 18.3356243,37.9946823 L18.5,38 L71.5,38 C72.8807119,38 74,36.8807119 74,35.5 C74,34.1192881 72.8807119,33 71.5,33 Z"></path>
        </svg>
      </li>
      <li>
        <svg viewBox="0 0 90 120" fill="currentColor">
          <path d="M90,0 L90,120 L11,120 C4.92486775,120 0,115.075132 0,109 L0,11 C0,4.92486775 4.92486775,0 11,0 L90,0 Z M71.5,81 L18.5,81 C17.1192881,81 16,82.1192881 16,83.5 C16,84.8254834 17.0315359,85.9100387 18.3356243,85.9946823 L18.5,86 L71.5,86 C72.8807119,86 74,84.8807119 74,83.5 C74,82.1745166 72.9684641,81.0899613 71.6643757,81.0053177 L71.5,81 Z M71.5,57 L18.5,57 C17.1192881,57 16,58.1192881 16,59.5 C16,60.8254834 17.0315359,61.9100387 18.3356243,61.9946823 L18.5,62 L71.5,62 C72.8807119,62 74,60.8807119 74,59.5 C74,58.1192881 72.8807119,57 71.5,57 Z M71.5,33 L18.5,33 C17.1192881,33 16,34.1192881 16,35.5 C16,36.8254834 17.0315359,37.9100387 18.3356243,37.9946823 L18.5,38 L71.5,38 C72.8807119,38 74,36.8807119 74,35.5 C74,34.1192881 72.8807119,33 71.5,33 Z"></path>
        </svg>
      </li>
      <li>
        <svg viewBox="0 0 90 120" fill="currentColor">
          <path d="M90,0 L90,120 L11,120 C4.92486775,120 0,115.075132 0,109 L0,11 C0,4.92486775 4.92486775,0 11,0 L90,0 Z M71.5,81 L18.5,81 C17.1192881,81 16,82.1192881 16,83.5 C16,84.8254834 17.0315359,85.9100387 18.3356243,85.9946823 L18.5,86 L71.5,86 C72.8807119,86 74,84.8807119 74,83.5 C74,82.1745166 72.9684641,81.0899613 71.6643757,81.0053177 L71.5,81 Z M71.5,57 L18.5,57 C17.1192881,57 16,58.1192881 16,59.5 C16,60.8254834 17.0315359,61.9100387 18.3356243,61.9946823 L18.5,62 L71.5,62 C72.8807119,62 74,60.8807119 74,59.5 C74,58.1192881 72.8807119,57 71.5,57 Z M71.5,33 L18.5,33 C17.1192881,33 16,34.1192881 16,35.5 C16,36.8254834 17.0315359,37.9100387 18.3356243,37.9946823 L18.5,38 L71.5,38 C72.8807119,38 74,36.8807119 74,35.5 C74,34.1192881 72.8807119,33 71.5,33 Z"></path>
        </svg>
      </li>
    </ul>
  </div>
  <span>正在验证用户信息...</span>
</div>

<div id="fail" style="display: none">
    <div>
        <svg t="1670047459834" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19724" width="150" height="150">
            <path d="M512 4.266667C792.32 4.266667 1019.733333 231.68 1019.733333 512S792.32 1019.733333 512 1019.733333 4.266667 792.32 4.266667 512 231.68 4.266667 512 4.266667z m0 76.8C274.133333 81.066667 81.066667 274.133333 81.066667 512c0 237.866667 193.066667 430.933333 430.933333 430.933333 237.866667 0 430.933333-193.066667 430.933333-430.933333 0-237.866667-193.066667-430.933333-430.933333-430.933333z" p-id="19725" fill="#FD6B6D"></path>
            <path d="M469.333333 682.666667a42.666667 42.666667 0 0 1 85.333334 0 42.666667 42.666667 0 0 1-85.333334 0zM469.333333 520.533333V298.666667a42.666667 42.666667 0 0 1 85.333334 0v221.866666a42.666667 42.666667 0 0 1-85.333334 0z" p-id="19726" fill="#FD6B6D"></path>
        </svg>
    </div>
    <span id="fail_msg" style="font-size: 18px;color:#FF0000;"></span>
    <div><a href="{{ $logout_url }}" class="back">重新登录</a></div>
</div>

</body>


<script src="/assets/js/jquery-3.6.3.min.js"></script>
<script src="/assets/js/jquery.cookie.js"></script>
<script>

    // $("#loading").hide();
    // $("#fail_msg").html("验证未通过");
    // $("#fail").show();
    // $("body").css("background","#FFFFFF");

    var token = "{{ $token }}";
    var login_url = "{{ $login_url }}";
    // 发起一个 ajax 请求
    $.ajax({
        type: 'POST', // 请求的方式
        url: login_url, // 请求的URL地址
        data: { // 要提交给服务器的数据
            token: token
        },
        success: function (res) { // 请求成功后的回调函数
            // console.log(res);
            if(res.code != 0){
                $("#loading").hide();
                $("#fail_msg").html(res.msg);
                $("#fail").show();
                $("body").css("background","#FFFFFF");
            }
            // header("Set-Cookie: vue_admin_template_client_token={$access_token}; path=/", false);
            var access_token = res.data.token_type + " " + res.data.access_token;
            $.cookie('vue_admin_template_client_token', access_token);
            // $identity = json_encode($data['data']['info']['roles'][0], JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE);
            // header("Set-Cookie: identity={$identity}; path=/", false);
            $.cookie('identity', res.data.info.roles[0]);
            window.location.href = "/user/index.html";
        }
    })
</script>
</html>